<p-panel [collapsed]="false" header="筛选查询" [collapsed]="false" headerClass="bg-eaeaea border-none" headerClass="bg-eaeaea border-none"
         [(searchText)]="searchObj.searchValue" maxlength="50" search="名称/编号" (onSearch)="search();dt.reset();">
  <div class="p-2-8">

    <!-- <div class="inline-block">
          <p-dropdown placeholder="请选择预警状态" styleClass="width-200 m-r-30"  [options]="isWarningStatus" [(ngModel)]="selectedWarningStatus" [ngModelOptions]="{standalone: true}"
                      optionLabel="name" (onChange)='search()'></p-dropdown>
        </div> -->

    <div class="inline-block">
      <span class="p-r-10 opacity06">状态： </span>
      <p-dropdown placeholder="全部" styleClass="width-150 m-r-20" [options]="isEffects" [(ngModel)]="selectedisEffect" [ngModelOptions]="{standalone: true}"
                  optionLabel="name" (onChange)='search();dt.reset();'></p-dropdown>
    </div>

    <div class="inline-block">
      <span class="p-r-10 opacity06">客户确认： </span>
      <p-dropdown placeholder="全部" styleClass="width-150 m-r-20" [options]="isCustomConfirm" [(ngModel)]="selectedConfirm"
                  [ngModelOptions]="{standalone: true}" optionLabel="name" (onChange)='search();dt.reset();'></p-dropdown>
    </div>

    <div class="inline-block">
      <span class="p-r-10 opacity06">客户评价： </span>
      <p-dropdown placeholder="全部" styleClass="width-150 m-r-20" [options]="isCustomDiscussStatus" [(ngModel)]="selectedCustomDiscuss"
                  [ngModelOptions]="{standalone: true}" optionLabel="name" (onChange)='search();dt.reset();'></p-dropdown>
    </div>

    <div class="inline-block">
      <span class="p-r-10 opacity06">客户回访： </span>
      <p-dropdown placeholder="全部" styleClass="width-150 m-r-20" [options]="isCustomBackStatus" [(ngModel)]="selectedIsCustomBack"
                  [ngModelOptions]="{standalone: true}" optionLabel="name" (onChange)='search();dt.reset();'></p-dropdown>
    </div>

    <!--<div class="inline-block width-250 pull-right">-->
    <!--<div class="relative">-->
    <!--<input type="text" class="width-full p-input" pInputText [(ngModel)]="searchObj.searchValue" placeholder="名称/编号"  (keyUp.enter)="search()">-->
    <!--<span class="icon-search-right" (click)="search()"></span>-->
    <!--</div>-->
    <!--</div>-->
  </div>
</p-panel>


<p-dataTable #dt [value]="listData"  [marginHeight]="20"  [totalRecords]="totalRecords"  [loading]="loading"
             [lazy]="true" (onLazyLoad)="onPage($event)"  [paginator]="true" [(selection)]="selectedRowData"
             [headerCheckboxToggleAllPages]="true" [emptyMessage]="'没有搜到您想要的数据'">
  <p-header>
    <button pButton type="button" (click)="addCheck()" label="新建" class="btn btn-secondary"></button>
    <button pButton type="button" (click)="toggleEffect('禁用',false)" label="禁用" class="btn btn-secondary"></button>
    <button pButton type="button" (click)="toggleEffect('启用',true)" label="启用" class="btn btn-secondary"></button>
  </p-header>
  <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
  <p-column *ngFor="let col of colsSelected" [field]='col.field' [header]='col.header' [hidden]="col.hidden" [sortable]="col.sortable">
    <ng-template let-index="rowIndex" let-data="rowData" pTemplate="body" *ngIf="col.tem">
      <!--<div *ngIf="col.field === 'code'" (click)="info(data)" style="color:#1a91eb;cursor:pointer;">-->
      <!--{{data.code}}-->
      <!--</div>-->
      <div *ngIf="col.field === 'code'">
        <a class="color-1a91eb" title="{{data[col.field]}}" target="_blank" [routerLink]="['/saas/engineer/constructionconfig/check/', data.id]"> {{data.code}} </a>
      </div>
    </ng-template>
  </p-column>
</p-dataTable>
